package com.bang.consumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Auther: Bang
 * @Date: 2019/11/26 23:23
 * @Description:
 */

@RestController
public class UserController {

    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/test")
    public Object user(){
        String res = restTemplate.getForObject("http://PROVIDER-TICKET/hello?msg=张三", String.class);
        return res;
    }

}
